﻿<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ViewHistory.aspx.cs" Inherits="TicketM.ViewHistory" %>

<asp:Content runat="server" ID="FeaturedContent" ContentPlaceHolderID="FeaturedContent">
    <section class="featured">
        <div class="content-wrapper">
            <hgroup class="title">
                <h1>Ticketing Application Configuration Manager: View History of Tickets and Efforts on Ticket by Team Members</h1>
            </hgroup>
         </div>
    </section>
</asp:Content>
<asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent">
    <%--<h3>This feature is not enabled</h3>--%>
        <table>
            <tr>
                <td style="vertical-align:top">
         <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="4" DataKeyNames="TicketId" DataSourceID="TicketsDataSource" ForeColor="#333333" GridLines="None" AllowPaging="True" OnSelectedIndexChanged="GridView1_SelectedIndexChanged">
        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
        <Columns>
            <asp:CommandField ShowSelectButton="True" />
            <asp:BoundField DataField="TicketId" HeaderText="ID" />
            <asp:BoundField DataField="TicketTitle" HeaderText="Title" />
        </Columns>
        <EditRowStyle BackColor="#999999" />
        <EmptyDataTemplate>
            No tickets found
        </EmptyDataTemplate>
        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
        <SortedAscendingCellStyle BackColor="#E9E7E2" />
        <SortedAscendingHeaderStyle BackColor="#506C8C" />
        <SortedDescendingCellStyle BackColor="#FFFDF8" />
        <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
        </asp:GridView>
                </td>
                <td style="vertical-align:top">
                  
        <asp:DetailsView ID="DetailsView1" runat="server" Height="50px" Width="359px" AutoGenerateRows="False" CellPadding="4" ForeColor="#333333" GridLines="None">
            <AlternatingRowStyle BackColor="White" />
            <CommandRowStyle BackColor="#D1DDF1" Font-Bold="True" />
            <EditRowStyle BackColor="#2461BF" />
            <FieldHeaderStyle BackColor="#DEE8F5" Font-Bold="True" />
            <Fields>
                <asp:BoundField DataField="ID" HeaderText="ID" />
                <asp:BoundField DataField="State" HeaderText="State" />
                <asp:BoundField DataField="Assigned To" HeaderText="Assigned To" />
                <asp:BoundField DataField="Description" HeaderText="Description" />
            </Fields>
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#EFF3FB" />
        </asp:DetailsView>
                    </td>
                <td  style="vertical-align:top">
                    <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="3">
                        <Columns>
                            <asp:BoundField DataField="Name" HeaderText="Name" />
                            <asp:BoundField DataField="Efforts" HeaderText="Efforts Min." />
                        </Columns>
                        <FooterStyle BackColor="White" ForeColor="#000066" />
                        <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
                        <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                        <RowStyle ForeColor="#000066" />
                        <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
                        <SortedAscendingCellStyle BackColor="#F1F1F1" />
                        <SortedAscendingHeaderStyle BackColor="#007DBB" />
                        <SortedDescendingCellStyle BackColor="#CAC9C9" />
                        <SortedDescendingHeaderStyle BackColor="#00547E" />
                    </asp:GridView>
                    <asp:ObjectDataSource ID="EffortsDataSource" runat="server" SelectMethod="GetEfforts" TypeName="TicketM.Models.Tickets">
                        <SelectParameters>
                            <asp:ControlParameter ControlID="GridView1" Name="id" PropertyName="SelectedValue" Type="Int32" DefaultValue="" />
                            <asp:SessionParameter Name="sProject" SessionField="sProject" Type="String" />
                        </SelectParameters>
                    </asp:ObjectDataSource>
                </td>
                </tr>
            </table>
                    <asp:ObjectDataSource ID="OneTicket" runat="server" SelectMethod="GetTicket" TypeName="TicketM.Models.Tickets">
                <SelectParameters>
                    <asp:ControlParameter ControlID="GridView1" Name="id" PropertyName="SelectedValue" Type="Int32" DefaultValue="" />
                    <asp:SessionParameter Name="sProject" SessionField="sProject" Type="String" />
                </SelectParameters>
            </asp:ObjectDataSource>
         
        <asp:ObjectDataSource ID="TicketsDataSource" runat="server" SelectMethod="GetTickets" TypeName="TicketM.Models.Tickets">
            <SelectParameters>
                <asp:SessionParameter Name="sProject" SessionField="sProject" Type="String" />
            </SelectParameters>
    </asp:ObjectDataSource>
               
</asp:Content>
